import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';


/*** =========================== 分页查询接口  =========================== */
// 人员考勤分页查询 /OMS/AttendanceRecord/QueryPageList
export const AttendanceRecordQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/AttendanceRecord/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 工种类型分页查询 /OMS/WorkType/QueryPageList
export const WorkTypeQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/WorkType/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 部门人员分页查询 /sysEmp/QueryPageList
export const sysEmpQueryPageList = (params?: object) => {
	return request({
		url: '/sysEmp/QueryPageList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 友商信息分页查询 /OMS/Provider/QueryPageList
export const ProviderQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/Provider/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 友商信息 查询所有 /OMS/Provider/GetList
export const ProviderGetList = (params?: object) => {
	return request({
		url: '/OMS/Provider/GetList',
		method: 'get',
		data: params,
	});
}

// 组织机构数据列表 查询所有 /sysOrg/list
export const sysOrgList = (params?: object) => {
	return request({
		url: '/sysOrg/list',
		method: 'get',
		data: params,
	});
}

// 友商奖罚管理分页查询 /OMS/ProviderReward/QueryPageList
export const ProviderRewardQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/ProviderReward/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 班组信息分页查询 /OMS/TeamGroup/QueryPageList
export const TeamGroupQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/TeamGroup/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 班次管理分页查询 /OMS/Scheduling/QueryPageList
export const SchedulingQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/Scheduling/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 人员工种分页查询 /OMS/EmpWorkType/QueryPageList
export const EmpWorkTypeQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/EmpWorkType/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 高危作业人员库分页查询 /OMS/EmpWorkType/QueryHiskWorkEmpPage
export const EmpWorkTypeQueryHiskWorkEmpPage = (params?: object) => {
	return request({
		url: '/OMS/EmpWorkType/QueryHiskWorkEmpPage',
		method: 'get',
		data: params,
	});
}

// 人员排班分页查询 /OMS/EmpScheduling/QueryPageList
export const EmpSchedulingQueryPageList = (params?: object) => {
	return request({
		url: '/OMS/EmpScheduling/QueryPageList',
		method: 'get',
		data: params,
	});
}

// 组织结构树 查询 /sysOrg/tree
export const sysOrgTree = (params?: object) => {
	return request({
		url: '/sysOrg/tree',
		method: 'get',
		data: params,
	});
}

// 工种类型List /OMS/WorkType/GetList
export const WorkTypeGetList = (params?: object) => {
	return request({
		url: '/OMS/WorkType/GetList',
		method: 'get',
		data: params,
	});
}

// 获取员工下拉框 /sysEmp/selector
export const SysEmpSelector = (params?: object) => {
	return request({
		url: '/sysEmp/selector',
		method: 'get',
		data: params,
	});
}

// 所有班次查询 /OMS/Scheduling/GetList
export const SchedulingGetList = (params?: object) => {
	return request({
		url: '/OMS/Scheduling/GetList',
		method: 'get',
		data: params,
	});
}

// 数据字典值 /sysDictData/list
export const sysDictDataList = (params?: object) => {
	return request({
		url: '/sysDictData/list',
		method: 'get',
		data: params,
	});
}

/*** =========================== 新增接口  =========================== */
// 组织机构 新增 /sysOrg/add
export const sysOrgAdd = (params: object) => {
	return request({
		url: '/sysOrg/add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 工种类型 新增 /OMS/WorkType/Add
export const WorkTypeAdd = (params: object) => {
	return request({
		url: '/OMS/WorkType/Add',
		method: 'post',
		data: params,
	});
}

// 部门人员 新增 /sysEmp/AddEmp
export const sysEmpAddEmp = (params: object) => {
	return request({
		url: '/sysEmp/AddEmp',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 友商信息 新增 /OMS/Provider/Add
export const ProviderAdd = (params: object) => {
	return request({
		url: '/OMS/Provider/Add',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 友商奖罚信息 新增 /OMS/ProviderReward/Add
export const ProviderRewardAdd = (params: object) => {
	return request({
		url: '/OMS/ProviderReward/Add',
		method: 'post',
		data: params,
	});
}

// 班组信息 新增 /OMS/TeamGroup/Add
export const TeamGroupAdd = (params: object) => {
	return request({
		url: '/OMS/TeamGroup/Add',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 班次管理新增 /OMS/Scheduling/Add
export const SchedulingAdd = (params: object) => {
	return request({
		url: '/OMS/Scheduling/Add',
		method: 'post',
		data: params,
	});
}

// 人员工种新增 /OMS/EmpWorkType/Add
export const EmpWorkTypeAdd = (params: object) => {
	return request({
		url: '/OMS/EmpWorkType/Add',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 人员排班 新增 /OMS/EmpScheduling/Add
export const EmpSchedulingAdd = (params: object) => {
	return request({
		url: '/OMS/EmpScheduling/Add',
		method: 'post',
		data: params,
	});
}

// 批量导入数据 /SMS/Upload/BatchImportData
export const UploadBatchImportData = (params: object) => {
	return request({
		url: '/SMS/Upload/BatchImportData',
		method: 'post',
		data: params,
	});
}

// 单文件上传 /sysFileInfo/uploadfile	
export const sysFileInfoUploadfile = (params: object) => {
	return request({
		url: '/sysFileInfo/uploadfile',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 获取雪花id /OMS/AttendanceRecord/GenerateId
export const AttendanceRecordGenerateId = (params?: object) => {
	return request({
		url: '/OMS/AttendanceRecord/GenerateId',
		method: 'get',
		data: params,
	});
}

/*** =========================== 编辑接口  =========================== */
// 组织架构 编辑 /sysOrg/edit
export const sysOrgEdit = (params: object) => {
	return request({
		url: '/sysOrg/edit',
		method: 'post',
		multiPartFormData: false,
		data: params,
	} as AxiosRequestConfig);
}

// 工种类型 编辑  /OMS/WorkType/Update
export const WorkTypeUpdate = (params: object) => {
	return request({
		url: '/OMS/WorkType/Update',
		method: 'post',
		data: params,
	});
}

// 员工编辑 /sysEmp/UpdateEmp
export const sysEmpUpdateEmp = (params: object) => {
	return request({
		url: '/sysEmp/UpdateEmp',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 友商信息编辑 /OMS/Provider/Update
export const ProviderUpdate = (params: object) => {
	return request({
		url: '/OMS/Provider/Update',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 友商奖罚 编辑 /OMS/ProviderReward/Update
export const ProviderRewardUpdate = (params: object) => {
	return request({
		url: '/OMS/ProviderReward/Update',
		method: 'post',
		data: params,
	});
}

//班组管理 编辑 /OMS/TeamGroup/Update
export const TeamGroupUpdate = (params: object) => {
	return request({
		url: '/OMS/TeamGroup/Update',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 班次管理 编辑 /OMS/Scheduling/Update
export const SchedulingUpdate = (params: object) => {
	return request({
		url: '/OMS/Scheduling/Update',
		method: 'post',
		data: params,
	});
}

// 人员工种 编辑 /OMS/EmpWorkType/Update
export const EmpWorkTypeUpdate = (params: object) => {
	return request({
		url: '/OMS/EmpWorkType/Update',
		method: 'post',
		data: params,
		multiPartFormData: true,
	} as AxiosRequestConfig);
}

// 人员排班 编辑 /OMS/EmpScheduling/Update
export const EmpSchedulingUpdate = (params: object) => {
	return request({
		url: '/OMS/EmpScheduling/Update',
		method: 'post',
		data: params,
	});
}

/*** =========================== 删除接口  =========================== */
// 组织架构 删除 /sysOrg/delete
export const sysOrgDelete = (params: object) => {
	return request({
		url: '/sysOrg/delete',
		method: 'post',
		data: params,
	});
}

// 工种类型 删除 /OMS/WorkType/Delete
export const WorkTypeDelete = (params: object) => {
	return request({
		url: '/OMS/WorkType/Delete',
		method: 'post',
		data: params,
	});
}

// 部门人员 删除 /sysEmp/DeleteEmp
export const sysEmpDeleteEmp = (params: object) => {
	return request({
		url: '/sysEmp/DeleteEmp',
		method: 'post',
		data: params,
	});
}

// 友商信息 删除 /OMS/Provider/Delete
export const ProviderDelete = (params: object) => {
	return request({
		url: '/OMS/Provider/Delete',
		method: 'post',
		data: params,
	});
}

//友商奖罚 删除 /OMS/ProviderReward/Delete
export const ProviderRewardDelete = (params: object) => {
	return request({
		url: '/OMS/ProviderReward/Delete',
		method: 'post',
		data: params,
	});
}

//班组信息 删除 /OMS/TeamGroup/Delete
export const TeamGroupDelete = (params: object) => {
	return request({
		url: '/OMS/TeamGroup/Delete',
		method: 'post',
		data: params,
	});
}

//班次管理 删除 /OMS/Scheduling/Delete
export const SchedulingDelete = (params: object) => {
	return request({
		url: '/OMS/Scheduling/Delete',
		method: 'post',
		data: params,
	});
}

// 人员工种 删除 /OMS/EmpWorkType/Delete
export const EmpWorkTypeDelete = (params: object) => {
	return request({
		url: '/OMS/EmpWorkType/Delete',
		method: 'post',
		data: params,
	});
}

//人员排班 删除 /OMS/EmpScheduling/Delete
export const EmpSchedulingDelete = (params: object) => {
	return request({
		url: '/OMS/EmpScheduling/Delete',
		method: 'post',
		data: params,
	});
}

// 文件删除 /sysFileInfo/delete
export const sysFileInfoDelete = (params: object) => {
	return request({
		url: '/sysFileInfo/delete',
		method: 'post',
		data: params,
	});
}
